import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("输入一个整数");
        //int n = scanner.nextInt();
        //double a = scanner.nextDouble();
        System.out.println("输入一个字符串");
        String s = scanner.next();
        System.out.println(s);
        //String string = scanner.nextLine();
        //System.out.println(n);
    }
    public static void main15(String[] args) {
        int a = 100;
        System.out.printf("%d",a);
        System.out.println();
        System.out.println(a);
    }
    public static void main14(String[] args) {
        int n = 1;
        int sum = 0;
        do {
            sum += n;
            n++;
        }while (n <= 100);

        System.out.println(sum);
    }
    public static void main13(String[] args) {
        // 1 + 2 +...+500
        int sum = 0;
//        for (int i = 1; i <= 100;i++){
//            sum += i;
//        }
//        for (int i = 0; i < 101; i++) {
//            sum+=i;
//        }
        int[] arr = {1,2,3,4,5};
        for(int x : arr){
            System.out.println(x);
        }
    }
    public static void main12(String[] args) {
        int n = 1;
        while (n <= 100){
            if ( n % 15 != 0){
                n++;
                continue;
            }
            System.out.println(n); // 找到了需要的值
            n++;
        }
    }
    public static void main11(String[] args) {
        int n = 100;
        while ( n <= 200){
            if (n % 3==0){
                System.out.println(n);
                break;
            }
            n++;
        }
    }
    public static void main10(String[] args) {
        // 计算 1!+2!+3!+4!+5!
        int n = 1;
        int sum = 0; // 求和
        while (n <= 5){
            int tmp = 1; // 算阶乘
            int m = 1; // 表示 n 之前的数字
            while (m <= n){
                tmp = tmp * m;
                m++;
            }
            sum += tmp;
            n++;
        }
        System.out.println(sum);
    }
    public static void main9(String[] args) {
        // 5 !
        int n = 1;
        int sum = 1;
        while (n <= 5){
            sum = sum * n;
            n++;
        }
        System.out.println(sum);
    }
    public static void main8(String[] args) {
        // 计算 1 - 100 之和
        int n = 1;
        int sum = 0;
        while (n <= 100){
            sum += n;
            n++;
        }
        System.out.println(sum);
    }
    public static void main7(String[] args) {
        int day = 8;
        switch (day){
            case 1:
                System.out.println("星期1");
                break;
            case 2:
                System.out.println("星期2");
                break;
            case 3:
                System.out.println("星期3");
                break;
            case 4:
                System.out.println("星期4");
                break;
            case 5:
                System.out.println("星期5");
                break;
            case 6:
                System.out.println("星期6");
                break;
            case 7:
                System.out.println("星期天");
                break;
            default:
                System.out.println("你输入的星期不合法");
        }
    }
    public static void main6(String[] args) {
        int a = 100;
        int b = 100;
        if (a == 100)
            if (b == 100)
                System.out.println("aaa");
    }
    public static void main5(String[] args) {
        int score = 90;
        if (score >= 90){
            System.out.println( "A");
        }else if (score >= 80 && score < 90){
            System.out.println("B");
        }else if (score >= 70 && score < 80){
            System.out.println("C");
        }else {
            System.out.println("D");
        }
    }
    public static void main4(String[] args) {
        // 判断一个数 是奇数还是偶数
        int a  = 7;
        if (a % 2 == 1){
            System.out.println(a + "是一个奇数");
        }else {
            System.out.println(a + "是一个偶数");
        }
    }
    public static void main3(String[] args) {
        int score = 100;
        if (score > 90){
            System.out.println("你的成绩优秀");
        }
//        if (1){
//
//        }
    }
    public static void main2(String[] args) {
        int a = 5;
        int b = 7;
        //给出两个数，求出两个数的最小值
        if (a > b){
            System.out.println(b);
        }else {
            System.out.println(a);
        }
        int min = a > b ?  b : a;
        System.out.println(min);
        boolean flg = (true == true ? (true == false ? false : true) : false);
        System.out.println(flg);
    }
    public static void main1(String[] args) {
        int a = 11;
        int b = 7;
        System.out.println(a & b);
        System.out.println(a | b);
        System.out.println(a ^ b);
        System.out.println(~a);
        System.out.println(b << 1);
        int c = 12;
        System.out.println( c >> 1);
        System.out.println(c >> 2);
        int d = -1;
        System.out.println(d >>> 1);
    }
}


